<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<TheWorldsWorst.ApiWrapper.Model.UserEvent>>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title><%= ViewData["UserName"] %>'s Activity</title>
    <link rel="Stylesheet" href="../../Content/Site.css" />
</head>
<body>
    <div>
        <a href="/"><img style="border-style: none" src="../../Content/img/logo.png" /></a>
    </div>
    <h1>Activity - <a href="/users/<%= ViewData["UserId"] %>">User</a></h1>
    <div>
    <% foreach (var e in Model)
       { %>
        <div class="activity">
            <%= Enum.GetName(typeof(TheWorldsWorst.StackOverflowClone.Model.UserTimelineType), e.UserTimelineType) %>
            <% if (e.UserTimelineType != TheWorldsWorst.StackOverflowClone.Model.UserTimelineType.Badge)
               {
                   if (e.UserTimelineType != TheWorldsWorst.StackOverflowClone.Model.UserTimelineType.Comment)
                   { %>
                    on <a href="/postredirect/<%= e.PostId %>">Post</a>
            <%     }
                   else
                   { %>
                    <a href="/commentredirect/<%= e.CommentId %>">here</a>
            <%     }
               } %>
            -&gt;
            <%= e.Description %>
            -&gt;
            <%= e.Detail %>
            -&gt;
            <%= e.Action %>
        </div>
    <% } %>
    </div>
</body>
</html>
